package villa.tools.mq.views;

import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.FormAttachment;
import org.eclipse.swt.layout.FormData;
import org.eclipse.swt.layout.FormLayout;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TabFolder;
import org.eclipse.swt.widgets.TabItem;
import org.eclipse.swt.widgets.Text;



class TabControlsP extends Composite{
	
	
	private TabFolder tf2 = null;
	
	public void setLayout(FormData formData)
	{
		this.tf2.setLayoutData(formData);
		
	}
	
	public TabItem getItem(int pos){
		return this.tf2.getItem(pos);
	}
	
	public void setTabItem(TabItem ti){
		TabControlsO tco = (TabControlsO)tf2.getItem(0).getControl();
		tco.setTabItem(ti);
	}
	
	public TabControlsP(Composite parent, int style) {
		super(parent, style);
		
		try {
			
			
			FormLayout layout = new FormLayout();
			layout.marginWidth = 5;
			layout.marginHeight = 5;
			this.setLayout(layout);
			
			FormData formData = new FormData();
			formData.top = new FormAttachment(0, 0);
			formData.left = new FormAttachment(0, 0);
			formData.right = new FormAttachment(100, 0);
			formData.bottom = new FormAttachment(100, 0);
			tf2 = new TabFolder(this, SWT.NONE);
		    tf2.setLayoutData(formData);
			
			TabItem ti21 = new TabItem(tf2, SWT.NONE);
		    TabControlsO tabControlsO = new TabControlsO(tf2,SWT.NONE);
		    ti21.setText("Menssage");
		    ti21.setControl(tabControlsO);
		    
		    
		    TabItem ti22 = new TabItem(tf2, SWT.NONE);
		    TabControlsH tabControlsH = new TabControlsH(tf2,SWT.NONE);
		    ti22.setText("Header");
		    ti22.setControl(tabControlsH);
		   
		  
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
}

